fix(vmi): Fix lane-strided f16 VCI lowering - #1471
Open
TelGome wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复 A5 VPTO 下 f16 lane-strided VCI 输出异常
关联 Issue
修复 GitHub Issue #1411 中报告的
f16 + group=1 + nomask精度问题。问题描述
在 A5 VPTO 后端中,
vci生成的f16向量使用lane_stride=2布局,并通过PK_B32写回时,vci + vadd的输出出现逐 lane 偏移。以
vci_vadd/f16_g1_nomask为例:994, 995, 996, 997, ...995, 997, 999, 1001, ...修复方案
在
VMIToVPTOlowering 中为 contiguous、lane-strided 的 iota 增加专用 materialization:f16 + lane_stride=2使用0.5缩放,抵消 VPTO VCI 的物理 lane 步长;ASC/DESC顺序和多 physical chunk 的 offset 处理;测试结果
PTOAS lowering 测试
PTODSL simulator 测试
筛选全部
vci用例时:剩余失败为
vci_vcvt/f32_g1和vci_vcvt/f32_g2的测试 IR 类型检查问题,与本次 f16 VCI lowering 修改无关。修改文件
lib/PTO/Transforms/VMIToVPTO.cpptest/lit/vmi_new/vmi_to_vpto_iota.pto